﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;

namespace DS_Server
{
    class DS_NET_Server
    {
        public static List<ClientHandler> clients = new List<ClientHandler>();

        private HttpListener myListener = null;
        string myPrefix = null;

        public DS_NET_Server()
        {
            myPrefix = "http://+:8811/";

            myListener = new HttpListener();
            myListener.Prefixes.Add(myPrefix);
            myListener.Start();
            
            while (true)
            {
                HttpListenerContext context = myListener.GetContext();
                ClientHandler initClient = new ClientHandler(context);
                clients.Add(initClient);
            }
        }
    }
}
